home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / wtek0693.zip / OOPALLEY.ZIP / XRECT.CPP < prev    next >
C/C++ Source or Header  |  1993-04-27  |  824b  |  26 lines

  1. #include "point.h"
  2. #include "rect.h"
  3. //#include "OrderedCltn.h"  // -gmv no OrderedCltn in rect
  4. #include "ordcltn.h"        // -gmv 2/24/90: added support for
  5.                             //               OrderedCltn.
  6.  
  7. main()
  8. {
  9.     cout << "\nTest class Rectangle\n";
  10.     Rectangle a(0,0,10,10);
  11.     Rectangle b(Point(1,2),Point(11,3));
  12.     Rectangle c;
  13.     cout << "a = " << a << "\n";
  14.     cout << "b = " << b << "\n";
  15.     cout << "a == b: " << (a==b) << "\n";
  16.     c = a;
  17.     cout << "a isEqual c: " << a.isEqual(c) << "\n";
  18.     cout << "a contains b: " << a.contains(b) << "\n";
  19.     cout << "a intersects b: " << a.intersects(b) << "\n";
  20.     cout << "a||b = " << (a||b) << "\n";
  21.     cout << "a&&b = " << (a&&b) << "\n";
  22.     cout << a.areasOutside(b); //-gmv no OrderedCltn in rect
  23.     return 0;
  24. }
  25.  
  26.